Wireless connection establishing methods and wireless connection establishing apparatuses

ABSTRACT

Embodiments of this application provide for establishment of a wireless connection. A method comprises: generating connection authentication information according to related information of a wired connection between a first device and a second device; and sending, in case of disconnection of, a wireless connection establishing request in such a manner that the request can be received by the second device, where the request comprises the connection authentication information. In the methods and apparatuses of embodiments of this application, by using related information of a wired connection as authentication information of establishing a wireless connection, the wireless connection can be established rapidly and securely, and/or device power consumption can also be considered.

RELATED APPLICATIONS

This patent application is a continuation of U.S. patent application Ser. No. 15/326,445, filed on Jan. 13, 2017, entitled “WIRELESS CONNECTION ESTABLISHING METHODS AND WIRELESS CONNECTION ESTABLISHING APPARATUSES”, which is a U.S. National Stage filing under 35 U.S.C. § 371 of international patent cooperation treaty (PCT) application No. PCT/CN2015/080856, filed Jun. 5, 2015, and entitled “WIRELESS CONNECTION ESTABLISHING METHODS AND WIRELESS CONNECTION ESTABLISHING APPARATUSES”, which claims the benefit of priority to Chinese Patent Application No. 201410344876.8 filed with the Chinese Patent Office on Jul. 18, 2014, which applications are hereby incorporated herein by reference in their respective entireties.

TECHNICAL FIELD

This application relates to the technical field of direct communication between devices, and in particular, to wireless connection establishing methods and wireless connection establishing apparatuses.

BACKGROUND

Generally, there are two ways of communication between devices: communication in a wired way through a wired connection such as USB or Ethernet, and communication in a wireless way through a wireless connection such as Wi-Fi or Bluetooth. The wired way is usually used to transmit a large quantity of data since small interference and large bandwidth, etc., while the wireless way is also widely used since high mobility and wide coverage, etc. During communication between devices through the wired connection, a wired connection may be disconnected because of some reasons, and in this case, in order to ensure that the communication is performed, the wired connection may be switched to the wireless connection. A scenario of switching between a wired connection and a wireless connection has such problem that: there may be multiple wireless devices available for connection around. Therefore, a solution which can rapidly determine an object with which to establish a wireless connection is desirable.

SUMMARY

The following presents a simplified summary of the disclosed subject matter in order to provide a basic understanding of some aspects of the disclosed subject matter. This summary is not an extensive overview of the disclosed subject matter. It is intended to neither identify key or critical elements of the disclosed subject matter nor delineate the scope of the disclosed subject matter. Its sole purpose is to present some concepts of the disclosed subject matter in a simplified form as a prelude to the more detailed description that is presented later.

An example, non-limiting objective of this application is to provide a wireless connection establishing method and a wireless connection establishing apparatus.

In a first example aspect of this application, a wireless connection establishing method is provided, where the method comprises:

-   -   generating connection authentication information according to         related information of a wired connection between a first device         and a second device; and     -   sending, in case of disconnection of the wired connection, a         wireless connection establishing request in such a manner that         the request can be received by the second device, wherein the         request comprises the connection authentication information.

In a second example aspect of this application, a wireless connection establishing method is provided, where the method comprises:

-   -   receiving a wireless connection establishing request of a first         device;     -   verifying, in response to that the request comprises connection         authentication information, legality of the first device         according to related information of a historical wired         connection between the first device and a second device; and     -   sending a response to the wireless connection establishing         request to the first device that is authenticated, where     -   the connection authentication information comprises the related         information of the historical wired connection between the first         device and the second device.

In a third example aspect of this application, a wireless connection establishing apparatus is provided, where the apparatus comprises:

-   -   a generating module, configured to generate connection         authentication information according to related information of a         wired connection between a first device and a second device; and     -   a sending module, configured to send, in case of disconnection         of the wired connection, a wireless connection establishing         request in such a manner that the request can be received by the         second device, wherein the request comprises the connection         authentication information.

In a fourth example aspect of this application, a wireless connection establishing apparatus is provided, where the apparatus comprises:

-   -   a receiving module, configured to receive a wireless connection         establishing request of a first device;     -   an authentication module, configured to verify, in response to         that the request comprises connection authentication         information, legality of the first device according to related         information of a historical wired connection between the first         device and a second device; and     -   a responding module, configured to send a response to the         wireless connection establishing request to the first device         that is authenticated, where     -   the connection authentication information comprises the related         information of the historical wired connection between the first         device and the second device.

In a fifth example aspect of this application, a computer readable storage device is provided, comprising at least one executable instruction, which, in response to execution, causes a system comprising a processor to perform operations, comprising:

-   -   generating connection authentication information according to         related information of a wired connection between a first device         and a second device; and     -   sending, in case of disconnection of the wired connection, a         wireless connection establishing request in such a manner that         the request can be received by the second device, wherein the         request comprises the connection authentication information.

In a sixth example aspect of this application, a device for wireless connection establishing is provided, comprising a processor and a memory, wherein the memory storing a computer executable instruction, the processor being connected with the memory via a communication bus, and when the device is operating, the processor executes or facilitates execution of the executable instructions stored by the memory to cause the device to perform operations, comprising:

-   -   generating connection authentication information according to         related information of a wired connection between a first device         and a second device; and     -   sending, in case of disconnection of the wired connection, a         wireless connection establishing request in such a manner that         the request can be received by the second device, wherein the         request comprises the connection authentication information.

In a seventh example aspect of this application, a computer readable storage device is provided, which, in response to execution, causes a system comprising a processor to perform operations, comprising:

-   -   receiving a wireless connection establishing request of a first         device;     -   verifying, in response to that the request comprises connection         authentication information, legality of the first device         according to related information of a historical wired         connection between the first device and a second device; and     -   sending a response to the wireless connection establishing         request to the first device that is authenticated, wherein     -   the connection authentication information comprises the related         information of the historical wired connection between the first         device and the second device.

In an eighth example aspect of this application, a device for wireless connection establishing is provided, comprising a processor and a memory, wherein the memory storing a computer executable instruction, the processor being connected with the memory via a communication bus, and when the device is operating, the processor executes or facilitates execution of the executable instructions stored by the memory to cause the device to perform operations, comprising:

-   -   receiving a wireless connection establishing request of a first         device;     -   verifying, in response to that the request comprises connection         authentication information, legality of the first device         according to related information of a historical wired         connection between the first device and a second device; and     -   sending a response to the wireless connection establishing         request to the first device that is authenticated, wherein     -   the connection authentication information comprises the related         information of the historical wired connection between the first         device and the second device.

In the methods and apparatuses of example embodiments of this application, by using related information of a wired connection as authentication information of establishing a wireless connection, the wireless connection can be established rapidly and securely, and/or device power consumption can also be considered.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is an example flowchart of a wireless connection establishing method according to a first embodiment of this application;

FIG. 2 is an example flowchart of a wireless connection establishing method according to a second embodiment of this application;

FIG. 3 is an example structural block diagram of a first wireless connection establishing apparatus according to a first embodiment of this application;

FIG. 4 is an example structural block diagram of a second wireless connection establishing apparatus according to a first embodiment of this application;

FIG. 5 is an example structural block diagram of a third wireless connection establishing apparatus according to a first embodiment of this application;

FIG. 6 is an example structural block diagram of a fourth wireless connection establishing apparatus according to a first embodiment of this application;

FIG. 7 is an example structural block diagram of a first wireless connection establishing apparatus according to a second embodiment of this application;

FIG. 8 is an example structural block diagram of a second wireless connection establishing apparatus according to a second embodiment of this application;

FIG. 9 is an example structural block diagram of a fifth wireless connection establishing apparatus according to a first embodiment of this application; and

FIG. 10 is an example structural block diagram of a third wireless connection establishing apparatus according to a second embodiment of this application.

DETAILED DESCRIPTION

The detailed description of this application is further described in detail hereinafter in connection with accompanying drawings (in several accompanying drawings, same numerals denote same elements) and embodiments. The following embodiments are used to describe this application, but not used to limit the scope of this application.

It can be understood by a person skilled in the art that the terms such as “first” and “second” in this application are only used to differentiate different steps, devices or modules, and the terms neither represent any specific technical meaning, nor represent an inevitable logic sequence between the steps, the devices, or the modules.

As shown in FIG. 1 , a wireless connection establishing method according to a first embodiment of this application comprises:

-   -   S120. Generate connection authentication information according         to related information of a wired connection between a first         device and a second device.

In each embodiment of this application, a first device and a second device are any devices that can perform direct communication between the two through a wired or wireless connection, such as, terminal devices (mobile phones, computers, earphones, or displays), network access devices (routers, switches, or repeaters), or wireless energy transmission devices. The communication may refer to a communication with a single input/output party, such as, a charging process or an audio/video signal output process, and may further refer to an interaction communication process, such as, data packet transmission. In each embodiment of this application, the first device and the second device are only used to distinguish roles of each device in a wireless connection establishing process.

The related information of the wired connection may be any information involved in a process of communicating through a wired connection, for example, may comprise at least one of the following: identification information of the first device and the second device, a data transmission rate/amount in a preset time point/period, related information of transmitted data (comprising a data type, a data size, and a file name), and a disconnection time of the wired connection.

-   -   S140. Send, in case of disconnection of the wired connection, a         wireless connection establishing request in such a manner that         the request can be received by the second device, where the         request comprises the connection authentication information.

In the method according to this embodiment, the connection authentication information is used to verify legality of one device (the first device) requesting to establish a wireless connection, and in order to ensure connection security, the connection authentication information may be used to serve as a ciphertext in the connection establishing request to be sent in an encryption form, or the connection authentication information directly serves as a key for encrypting some or all content of the request.

In the method according to this embodiment, the connection authentication information is information that only the two devices in the wired connection can know, and therefore, the wireless connection can be established securely and rapidly by using such connection authentication information.

In an example embodiment, in order not to increase device burden, in S120, the connection authentication information may be generated in response to the disconnection of the wired connection.

Generally, after the wired connection is disconnected, both of the two devices in the wired connection will play a role in establishing a wireless connection, that is, after the wired connection is disconnected, each device plays a role of a broadcast party (one party initiating the wireless connection) to broadcast a message that the device may establish the wireless connection, and waits for the wireless connection establishing request; meanwhile or optionally, each device also plays a role of scanning party (one party allowing to be wirelessly connected) at any time to scan the broadcast message of the other device, so as to search for the other device which may establish the wireless connection with the device. In the method according to this embodiment, in order to avoid connection delay caused by randomly determining roles of devices in a wireless connection establishing process and save device energy consumption, before the generating connection authentication information in S120, the method may further comprise:

-   -   S110. Determine, according to a transmission characteristic of         the wired connection, a role of the first device in the process         of establishing the wireless connection.

The transmission characteristic of the wired connection may comprise: a signal sending party during communicating through the wired connection, a signal receiving party during communicating through the wired connection, a signal sending party and a signal receiving party during communicating through the wired connection, or, a signal transmission direction before the wired connection is disconnected.

For example, in a process of charging through a wired connection, a power supply party is a signal sending party, and a charged device is a signal receiving party.

In a process of performing audio/video playback through a wired connection, a device providing an audio/video source is a signal sending party, and an audio/video output device such as an earphone/display is a signal receiving party.

In a process of performing data packet exchange through a wired connection, at a moment before the wired connection is disconnected, a terminal device sends an access request to an AP, and a data packet transmission direction is from the terminal device to the AP.

Any party in the wired connection mentioned above could be determined as the initiator to establish the wireless connection in the method according to this embodiment. Correspondingly, in step S140, the wireless connection establishing request may be sent, that is, steps S120 and S140 may be performed, only if the wired connection is disconnected and the role of the first device is the initiator (broadcast party). If the role of the first device is a waiting party (scanning party), a method described in a next embodiment will be performed.

Moreover, in order to implement the method of the embodiment of this application, the first device and the second device may have agree on a connection authentication way, and the connection authentication way comprises: which related information of the wired connection is used as connection authentication information, an encryption manner of the connection authentication information, and the like. For example, the two parties have agree on that, a data transmission amount in five minutes before the disconnection of the wired connection is used as connection authentication information, or time for which the wired connection is disconnected is used as connection authentication information, or time of the wired connection is used as a key for encrypting identification information of the initiator, or the like. Correspondingly, the method of this embodiment further comprises:

-   -   S100. Determine a connection authentication way of establishing         a wireless connection between the first device and the second         device.

Since characteristics of the wired connection such as small interference, large bandwidth, and high privacy security, the determining a connection authentication way in step S100 may be performed during the communication between the first device and the second device through the wired connection.

Furthermore, in the sending a wireless connection establishing request in such a manner that the request can be received by the second device in step S120, preferably, the wireless connection establishing request is sent in a broadcast way. Moreover, transmit power of the broadcast may be determined according to a communications protocol based on which the communication through the wired connection is. For example, if the wired connection is a connection through a USB, and the length of a USB cable cannot exceed 5 m based on standards, and therefore it may be determined that a possible distance between the first device and the second device does not exceed 5 m, in order to save device power consumption, and reduce the quantity of irrelevant devices receiving a broadcast packet, the first device may broadcast the wireless connection authentication information at a transmit power which can be received by a device within a range of 5 m.

After the connection authentication information is sent, the second device may receive the connection authentication information and be capable of verify legality of the first device according to the authentication way agreed on establishing a wireless connection with the first device by returning a response. Correspondingly, the method of this embodiment further comprises:

-   -   S160. Receive a response of the second device to the wireless         connection establishing request, thereby completing         establishment of the wireless connection with the second between         devices.

To sum up, in the method according to this embodiment, by using related information of a wired connection as authentication information of establishing a wireless connection, the wireless connection can be established rapidly and securely, and device power consumption can also be considered.

The method of the foregoing embodiment is mainly run at the initiator establishing the wireless connection, and for the other party establishing the wireless connection, that is, equivalent to the second device in the foregoing embodiment, this application also correspondingly provides a wireless connection establishing method of another embodiment, so as to be performed. As shown in FIG. 2 , the method comprises:

-   -   S220. Receive a wireless connection establishing request of a         first device.

A second device serving as the other party establishing a wireless connection waits to receive the wireless connection establishing request from the first device after a wired connection between the second device and the first device is disconnected.

-   -   S240. Verify, in response to that the request comprises         connection authentication information, legality of the first         device according to related information of a historical wired         connection between the first device and a second device.

During waiting for wireless connection establishing request, the second device may receive a connection request sent by more than one requesting party. In response to that the request comprises the connection authentication information used in the method according to this application, legality of the requesting party is verified based on related information of a historical wired connection of the requesting party.

-   -   S260. Send a response to the wireless connection establishing         request to the first device that is authenticated, thereby         establishing a wireless connection between the second device and         the legal first device.

The connection authentication information comprises the related information of the historical wired connection between the first device and the second device. The related information of the wired connection may be any information involved in a process of communicating in a wired connection manner, such as, may comprise at least one of the following: identification information of the first device and the second device, a data transmission amount in a preset time point/period, related information of transmitted data (comprising a data type, a data size, and a file name), and a disconnection time of the wired connection. To ensure communication security, the connection authentication information may be encrypted in any encryption manner.

To sum up, in the method of this embodiment, the connection authentication information is information that only the two devices in the wired connection can know, and therefore, the wireless connection can be established securely and rapidly by using such connection authentication information.

Moreover, in order to implement the method of the embodiment of this application, the first device and the second device may agree on a connection authentication manner, and the connection authentication manner comprises: which related information of the wired connection is used as connection authentication information, an encryption manner of the connection authentication information, and the like. For example, the two parties agree on that, a data transmission amount in five minutes before the disconnection of the wired connection is used as connection authentication information, or time for which the wired connection is disconnected is used as connection authentication information, or time of the wired connection is used as a key for encrypting identification information of the initiator, or the like. Correspondingly, the method according to this embodiment further comprises:

-   -   S210. Determine a connection authentication way of establishing         a wireless connection between the first device and the second         device.

Since characteristics of the wired connection such as small interference, large bandwidth, and high privacy security, the determining a connection authentication way in step S210 may be performed during the communication between the first device and the second device through the wired connection.

Persons skilled in the art can understand that, in the foregoing methods of the specific implementation manners of this application, the value of the sequence number of each step does not indicate an execution order, and the execution order of the steps should be determined according to a function and an inherent logic thereof, and should not form any limit to the implementation process of the specific implementation manners of this application.

Moreover, an embodiment of this application further provides a computer readable medium, comprising a computer readable instruction for performing the following operations when being executed: operations of performing the steps of the method in the implementation manner shown in FIG. 1 .

An embodiment of this application further provides a computer readable medium, comprising a computer readable instruction for performing the following operations when being executed: operations of performing the steps of the method in the implementation manner shown in FIG. 2 .

This application further provides a wireless connection establishing apparatus. As shown in FIG. 3 , FIG. 3 is a structural block diagram of a wireless connection apparatus 300 of an embodiment of this application. The apparatus 300 of the embodiment shown in FIG. 3 may be a wireless connection establishing initiator device, that is, a part of a first device, or an independent apparatus. As shown in FIG. 3 , the apparatus 300 comprises: a generating module 320 and a sending module 340.

The generating module 320 is configured to generate connection authentication information according to related information of a wired connection between a first device and a second device.

The related information of the wired connection may be any information involved in a process of communicating through a wired connection, for example, may comprise at least one of the following: identification information of the first device and the second device, a data transmission rate/amount in a preset time point/period, related information of transmitted data (comprising a data type, a data size, and a file name), and a disconnection time of the wired connection.

The sending module 340 is configured to send, in case of disconnection of the wired connection, a wireless connection establishing request in such a manner that the request can be received by the second device, where the request comprises the connection authentication information.

In the apparatus according to this embodiment, the connection authentication information is used to verify legality of one device (the first device) requesting to establish a wireless connection, and in order to ensure connection security, the connection authentication information may be used to serve as a ciphertext in the connection establishing request to be sent in an encryption form, or the connection authentication information directly serves as a key for encrypting some or all content of the request.

In the apparatus according to this embodiment, the connection authentication information is information that only the two devices in the wired connection can know, and therefore, the wireless connection can be established securely and rapidly by using such connection authentication information.

In an example embodiment, in order not to increase device burden, the generating module 320 may generate the connection authentication information in response to the disconnection of the wired connection.

Generally, after the wired connection is disconnected, both of the two devices in the wired connection generally will play a role in establishing a wireless connection, that is, after the wired connection is disconnected, each device plays a role of a broadcast party (one party initiating the wireless connection) to broadcast a message that the device may establish the wireless connection, and waits for the wireless connection establishing request; meanwhile or optionally, each device also plays a role of scanning party (one party allowing to be wirelessly connected) at any time to scan the broadcast message of the other device, so as to search for the other device which may establish the wireless connection with the device. In the apparatus according to this embodiment, in order to avoid connection delay caused by randomly determining roles of devices in a wireless connection establishing process and save device energy consumption, as shown in FIG. 4 , the apparatus may further comprise:

-   -   a first determining module 310, configured to: before the         generating module 320 generates the connection authentication         information, determine, according to a transmission         characteristic of the wired connection, a role of the first         device in the process of establishing the wireless connection.

The transmission characteristic of the wired connection may comprise: a signal sending party during communicating through the wired connection, a signal receiving party during communicating through the wired connection, a signal sending party and a signal receiving party during communicating through the wired connection, or, a signal transmission direction before the wired connection is disconnected.

For example, in a process of charging through wired connection, a power supply party is a signal sending party, and a charged device is a signal receiving party.

In a process of performing audio/video playback through a wired connection, a device providing an audio/video source is a signal sending party, and an audio/video output device such as an earphone/display is a signal receiving party.

In a process of performing data packet exchange through a wired connection, at a moment before the wired connection is disconnected, a terminal device sends an access request to an AP, and a data packet transmission direction is from the terminal device to the AP.

Any party in the wired connection mentioned above could be determined as the initiator to establish the wireless connection according to this application. Correspondingly, the sending module 340 may send the wireless connection establishing request only if the wired connection is disconnected and when a role of the first device is an initiator (broadcast party).

Moreover, in order to achieve the objective of this application, the first device and the second device may have agree on a connection authentication way, and the connection authentication way comprises: which related information of the wired connection is used as connection authentication information, an encryption manner of the connection authentication information, and the like. For example, the two parties agree on that, a data transmission amount in five minutes before the disconnection of the wired connection is used as connection authentication information, or time for which the wired connection is disconnected is used as connection authentication information, or time of the wired connection is used as a key for encrypting identification information of the initiator, or the like. Correspondingly, as shown in FIG. 5 , the apparatus 300 of this embodiment further comprises:

-   -   a second determining module 360, configured to determine a         connection authentication way of establishing a wireless         connection between the first device and the second device.

Since characteristics of the wired connection such as small interference, large bandwidth, and high privacy security, the second determining module 360 may determine a connection authentication way during the communication between the first device and the second device through the wired connection.

Furthermore, the sending, by the sending module 340, a wireless connection establishing request in such a manner that the request can be received by the second device is preferably implemented in a broadcast way. Moreover, transmit power of the broadcast may be determined according to a communications protocol based on which the communication through the wired connection is. For example, if the wired connection is a connection through USB, and the length of a USB cable cannot exceed 5 m according to standards, and therefore it may be determined that a possible distance between the first device and the second device does not exceed 5 m, in order to save device power consumption, and reduce the quantity of irrelevant devices receiving a broadcast packet, the sending module 340 may broadcast the wireless connection authentication information at a transmit power which can be received by a device within a range of 5 m.

After the connection authentication information is sent, the second device may receive the connection authentication information and be capable of verify legality of the first device according to the authentication way agreed on establishing a wireless connection with the first device by returning a response. Correspondingly, as shown in FIG. 6 , the apparatus 300 of this embodiment further comprises:

-   -   a receiving module 380, configured to receive a response of the         second device to the wireless connection establishing request,         thereby completing establishment of the wireless connection with         the second between devices.

To sum up, in the apparatus according to this embodiment, by using related information of a wired connection as authentication information of establishing a wireless connection, the wireless connection can be established rapidly and securely, and device power consumption can also be considered.

This application further correspondingly provides a wireless connection establishing apparatus of another embodiment, all or part of which may belong to the second device in the foregoing embodiments, or which may also be an independent apparatus. As shown in FIG. 7 , a wireless connection establishing apparatus 700 of another embodiment of this application comprises: a receiving module 720, an authentication module 740, and a responding module 760.

The receiving module 720 is configured to receive a wireless connection establishing request of a first device.

A second device serving as the other party establishing a wireless connection waits to receive the wireless connection establishing request from the first device after a wired connection between the second device and the first device is disconnected.

The authentication module 740 is configured to verify, in response to that the request comprises connection authentication information, legality of the first device according to related information of a historical wired connection between the first device and a second device.

During waiting for wireless connection establishing request, the second device may receive a connection request sent by more than one requesting party. In response to that the request comprises the connection authentication information used in the method according to this application, the authentication module 740 verifies legality of the requesting party based on related information of a historical wired connection of the requesting party.

The responding module 760 is configured to send a response to the wireless connection establishing request to the first device that is authenticated, thereby establishing a wireless connection between the second device and the legal first device.

The connection authentication information comprises the related information of the historical wired connection between the first device and the second device. The related information of the wired connection may be any information involved in a process of communicating in a wired connection manner, such as, may comprise at least one of the following: identification information of the first device and the second device, a data transmission amount in a preset time point/period, related information of transmitted data (comprising a data type, a data size, and a file name), and a disconnection time of the wired connection.

To sum up, in the apparatus of this embodiment, the connection authentication information is information that only the two devices in the wired connection can know, and therefore, the wireless connection can be established securely and rapidly by using such connection authentication information.

Moreover, in order to achieve the objective of this application, the first device and the second device may agree on a connection authentication manner, and the connection authentication manner comprises: which related information of the wired connection is used as connection authentication information, an encryption manner of the connection authentication information, and the like. For example, the two parties agree on that, a data transmission amount in five minutes before the disconnection of the wired connection is used as connection authentication information, or time for which the wired connection is disconnected is used as connection authentication information, or time of the wired connection is used as a key for encrypting identification information of the initiator, or the like. Correspondingly, as shown in FIG. 8 , the apparatus 700 according to this embodiment further comprises:

-   -   a determining module 780, configured to determine a connection         authentication way of establishing a wireless connection between         the first device and the second determining module 360 in the         apparatus 300 of the previous embodiment.

Since characteristics of the wired connection such as small interference, large bandwidth, and high privacy security, the determining module 780 may communicate with, for example, the second determining module 360 in the apparatus 300 of the previous embodiment in a wired manner in a process that the first device and the second device communicate in a wired connection manner, so as to determine a connection authentication manner.

FIG. 9 is a schematic structural diagram of a wireless connection establishing apparatus 900 provided in an embodiment of this application, and the specific embodiment of this application does not limit implementation of the wireless connection establishing apparatus 900. As shown in FIG. 9 , the wireless connection establishing apparatus 900 may comprise:

-   -   a processor 910, a communications interface 920, a memory 930,         and a communications bus 940.

The processor 910, the communications interface 920, and the memory 930 communicate with each other through the communications bus 940.

The communications interface 920 is configured to communicate with a network element such as a client.

The processor 910 is configured to execute a program 932, which specifically may implement a related function of the wireless connection establishing apparatus in the apparatus embodiment in FIG. 3 .

Specifically, the program 932 may comprise program code, where the program code comprises a computer operation instruction.

The processor 910 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits that are configured to implement the embodiment of this application. The program 932 specifically may be configured to enable the wireless connection establishing apparatus 900 to perform the following steps:

-   -   generating connection authentication information according to         related information of a wired connection between a first device         and a second device; and     -   sending, in case of disconnection of the wired connection, a         wireless connection establishing request in such a manner that         the request can be received by the second device, where the         request comprises the connection authentication information.

For implementation of steps in the program 932, reference may be made to corresponding description of related steps and units in the foregoing embodiment, which is not described here. It can be clearly understood by persons skilled in the art that, for the purpose of convenient and brief description, as for a specific working process of the foregoing device and module, reference can be made to the corresponding process description in the foregoing method embodiments, and the details are not described herein again.

FIG. 10 is a schematic structural diagram of a wireless connection establishing apparatus 1000 provided in an embodiment of this application, and the specific embodiment of this application does not limit implementation of the wireless connection establishing apparatus 1000. As shown in FIG. 10 , the wireless connection establishing apparatus 1000 may comprise:

-   -   a processor 1010, a communications interface 1020, a memory         1030, and a communications bus 1040.

The processor 1010, the communications interface 1020, and the memory 1030 communicate with each other through the communications bus 1040.

The communications interface 1020 is configured to communicate with a network element such as a client.

The processor 1010 is configured to execute a program 1032, which specifically may implement a related function of the wireless connection establishing apparatus in the apparatus embodiment in FIG. 7 .

Specifically, the program 1032 may comprise program code, where the program code comprises a computer operation instruction.

The processor 1010 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits that are configured to implement the embodiment of this application. The program 1032 specifically may be configured to enable the wireless connection establishing apparatus 1000 to perform the following steps:

-   -   receiving a wireless connection establishing request of a first         device;     -   verifying, in response to that the request comprises connection         authentication information, legality of the first device         according to related information of a historical wired         connection between the first device and a second device; and     -   sending a response to the wireless connection establishing         request to the first device that is authenticated, where     -   the connection authentication information comprises the related         information of the historical wired connection between the first         device and the second device.

For implementation of steps in the program 1032, reference may be made to corresponding description of related steps and units in the foregoing embodiment, which is not described here. It can be clearly understood by persons skilled in the art that, for the purpose of convenient and brief description, as for a specific working process of the foregoing device and module, reference can be made to the corresponding process description in the foregoing method embodiments, and the details are not described herein again.

It can be clearly understood by persons skilled in the art that, for the purpose of convenient and brief description, as for a specific working process of the foregoing device and module, reference can be made to the corresponding description in the foregoing apparatus embodiments, and the details are not described herein again.

Although the present invention is described herein the general context of program modules that execute in conjunction with an application program that runs on an operating system on a computer system, a person skilled in the art will recognize that the present invention may also be implemented in combination with other types of program modules. Generally, program modules comprise routines, programs, components, data structures and other types of structures that perform particular tasks or implement particular abstract data types. It can be understood by a person skilled in the art that the present invention described herein may be practiced with other computer system configurations, comprising handheld devices, multiprocessor systems, microprocessor-based or programmable consumer electronics, minicomputers, mainframe computers, and so on, and may also be practiced in distributed computing environments where tasks are performed by remote processing devices linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote memory storage devices.

A person of ordinary skill in the art may be aware that, in combination with the examples described in the embodiments disclosed in this specification, units and method steps may be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether the functions are performed by hardware or software depends on particular applications and design constraint conditions of the technical solutions. A person skilled in the art may use different methods to implement the described functions for each particular application, but it should not be considered that the example embodiment goes beyond the scope of this application.

When the functions are implemented in a form of a software functional unit and sold or used as an independent product, the functions may be stored in a computer-readable storage medium. Based on such an understanding, the technical solutions of this application essentially, or the part contributing to the prior art, or part of the technical solutions may be implemented in the form of a software product. The computer software product is stored in a storage medium, and comprises several instructions for instructing a computer device (which may be a personal computer, a server, a network device, and the like) to perform all or a part of the steps of the method described in the embodiment of this application. The foregoing computer-readable storage medium comprises physical volatile and non-volatile, removable and non-removable mediums that are implemented in any method or technology for storage of information such as computer-readable instructions, data structures, program modules or other data. The computer-readable storage medium specifically comprises, but is not limited to, a USB flash drive, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory or other solid-state memory technology, a CD-ROM, a digital versatile disc (DVD), an HD-DVD, a Blue-ray disc or other optical storage devices, a magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used for storing information and can be accessed by a computer.

The foregoing example embodiments are merely intended for describing this application rather than limiting this application. A person of ordinary skill in the art should understand that modifications and variations may still be made without departing from the spirit and scope of this application. Therefore, all equivalent technical solutions shall fall within the scope of this application, and the patent protection scope of this application shall be subject to the claims. 

What is claimed is:
 1. A method, comprising: in response to a disconnection of a wired connection between a first device and a second device, determining, by the second device, according to a transmission characteristic of the wired connection, a role of the first device in a process of establishing a wireless connection; in response to determining that the role of the first device is an initiator, receiving, by the second device, a wireless connection establishing request of the first device; in response to determining that the wireless connection establishing request comprises connection authentication information, verifying, by the second device, a legality of the first device according to related information of the wired connection between the first device and the second device, wherein the connection authentication information is generated according to the related information of the wired connection between the first device and the second device, and the connection authentication information is only knowable by the first device and the second device; and sending, by the second device, to the first device that is authenticated based on the verifying, a response to the wireless connection establishing request.
 2. The method of claim 1, further comprising: determining, by the second device, a connection authentication way of establishing the wireless connection between the first device and the second device.
 3. The method of claim 2, wherein the determining the connection authentication way comprises: determining the connection authentication way during communication between the first device and the second device via the wired connection.
 4. The method of claim 1, wherein the related information of the wired connection comprises at least one of identification information of the first device and the second device, a data transmission amount in a preset time period, information related to transmitted data, or a disconnection time of the wired connection.
 5. A first device, comprising: a memory that stores executable modules; and a processor, coupled to the memory, that executes or facilitates execution of the executable modules, comprising: a first determining module configured to, in response to a disconnection of a wired connection between the first device and a second device, determine, according to a transmission characteristic of the wired connection, a role of the second device in the process of establishing a wireless connection; a receiving module configured to, in response to determining that the role of the second device is an initiator, receive a wireless connection establishing request of the second device; an authentication module configured to, in response to a determination that the wireless connection establishing request comprises connection authentication information, verify a legality of the second device according to related information of the wired connection between the first device and the second device, wherein the connection authentication information is generated according to the related information of the wired connection between the first device and the second device, and the connection authentication information is only knowable by the first device and the second device; and a responding module configured to send, to the second device that is authenticated based on the verifying, a response to the wireless connection establishing request.
 6. The first device of claim 5, wherein the executable modules further comprise: a determining module, configured to determine a connection authentication way of establishing the wireless connection between the first device and the second device.
 7. The first device of claim 6, wherein the determining module is further configured to determine the connection authentication way during communication between the first device and the second device via the wired connection.
 8. The first device of claim 5, wherein the related information of the wired connection comprises at least one of identification information of the first device and the second device, a data transmission amount in a preset time period, information related to transmitted data, or a disconnection time of the wired connection.
 9. A computer readable storage device, comprising at least one executable instruction, which, in response to execution, causes a first device comprising a processor to perform operations, comprising: in response to a disconnection of a wired connection between the first device and a second device, determining, according to a transmission characteristic of the wired connection, a role of the second device in the process of establishing a wireless connection; in response to determining that the role of the second device is an initiator, receiving a wireless connection establishing request of the second device; in response to determining that the wireless connection establishing request comprises connection authentication information, verifying a legality of the second device according to related information of the wired connection between the first device and the second device, wherein the connection authentication information is generated according to the related information of the wired connection between the first device and the second device, and the connection authentication information is only knowable by the first device and the second device; and sending, to the second device that is authenticated based on the verifying, a response to the wireless connection establishing request.
 10. The computer readable storage device of claim 9, wherein the operations further comprises: determining a connection authentication way of establishing the wireless connection between the first device and the second device.
 11. The computer readable storage device of claim 10, wherein the determining the connection authentication way comprises: determining the connection authentication way during communication between the first device and the second device via the wired connection.
 12. The computer readable storage device of claim 9, wherein the related information of the wired connection comprises at least one of identification information of the first device and the second device, or a data transmission amount in a preset time period.
 13. The computer readable storage device of claim 9, wherein the related information of the wired connection comprises at least one of information related to transmitted data, or a disconnection time of the wired connection.
 14. A system, comprising: a first device; and a second device that: in response to a disconnection of a wired connection between the first device and the second device, determines, according to a transmission characteristic of the wired connection, a role of the first device in a process of establishing a wireless connection; in response to determining that the role of the first device is an initiator, receives a wireless connection establishing request of the first device; in response to determining that the wireless connection establishing request comprises connection authentication information, verify a legality of the first device according to related information of the wired connection between the first device and the second device, wherein the connection authentication information is generated according to the related information of the wired connection between the first device and the second device, and the connection authentication information is only knowable by the first device and the second device; and sends, to the first device that is authenticated based on the legality being verified, a response to the wireless connection establishing request.
 15. The system of claim 14, wherein the second device further: determines a connection authentication way of establishing the wireless connection between the first device and the second device.
 16. The system of claim 15, wherein the second device determines the connection authentication way during communication between the first device and the second device via the wired connection.
 17. The system of claim 14, wherein the related information of the wired connection comprises identification information of the first device and the second device.
 18. The system of claim 14, wherein the related information of the wired connection comprises a data transmission amount in a preset time period.
 19. The system of claim 14, wherein the related information of the wired connection comprises information related to transmitted data.
 20. The system of claim 14, wherein the related information of the wired connection comprises a disconnection time of the wired connection. 